﻿CREATE FUNCTION [dbo].[NLin_NSIMaterial]
	(
	@ID int
	)
RETURNS int
AS
	BEGIN
	DECLARE @n_material_u int
	
	SELECT @n_material_u = COUNT(ID) FROM INVOICE_IN_ITEM WHERE NSI_MATERIAL_ID = @ID   
	
	RETURN @n_material_u
	END

